package org.raymond.iworks.core.constants;

import java.util.concurrent.TimeUnit;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class LockConstants {
    private LockConstants(){}
    public final static TimeUnit DEFAULT_UNIT = TimeUnit.MILLISECONDS;

    public final static String LOCK_PREFIX_REPEAT = "lock_repeat:";
    public final static Long LOCK_EXPIRE_REPEAT = 5000L;

    public final static String LOCK_PREFIX_USER = "lock_user:";
    public final static long LOCK_TIMEOUT_USER = 1_000;

    public final static String RATE_LIMITER_USER = "rate_limiter_user";
    public final static long RATE_USER = 10;
    public final static long RATE_INTERVAL_USER = 10_000;
    public final static long RATE_ACQUIRE_TIMEOUT_USER = 3_000;

    public final static String BLOOM_FILTER_USERNAME = "bloom_filter_full_username";
    public final static String BLOOM_FILTER_DEL_USERNAME = "bloom_filter_del_username";
    public final static double BLOOM_FILTER_FALSEPROBABILITY = 0.001;
}
